package com.wlw.admin.openeye.mvp.model

import com.wlw.admin.openeye.mvp.model.bean.HomeBean
import com.wlw.admin.openeye.net.RetrofitManager
import com.wlw.admin.openeye.rx.scheduler.SchedulerUtils
import io.reactivex.Observable

class HomeModel {
    fun requestHomeData(num: Int): Observable<HomeBean> {
        return RetrofitManager.service.getFirstHomeData(num).compose(SchedulerUtils.ioToMain())
    }

    fun loadMoreData(url: String): Observable<HomeBean> {
        return RetrofitManager.service.getMoreData(url).compose(SchedulerUtils.ioToMain())
    }
}